/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.chl.da.pagebeans;

import edu.chl.da.ejb.core.Flight;
import edu.chl.da.ejb.ctrl.IManageFlight;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 * Controller bean that handles the "Last Minute Box" located in the
 * middle of the customer start page. Listing all upcoming flights
 * sorted by date.
 */
@ManagedBean(name="LastMinuteBoxBean")
@RequestScoped
public class LastMinuteBoxBean {

    @EJB
    IManageFlight imf;

    /** Creates a new instance of LastMinuteBoxBean */
    public LastMinuteBoxBean() {
    }

    public List<Flight> getFlightList() {
        return imf.getAllFlightsSortedByStartDate();
    }

}
